
										<div class="tabbable">
											<ul class="nav nav-tabs" id="myTab">
												<li class="active">
													<a data-toggle="tab" href="#danxuan">
														<i class="green icon-home bigger-110"></i>
														单选题
													</a>
												</li>

												<li class="">
													<a data-toggle="tab" href="#duoxuan">
														多选题
													</a>
												</li>

												<li class="">
													<a data-toggle="tab" href="#tiankong">
														填空题
													</a>
												</li>
											</ul>

											<div class="tab-content">
												<div id="danxuan" class="tab-pane active">
													<?php echo $this->renderPartial("_danxuanti",array('sur'=>$sur));?>
												</div>

												<div id="duoxuan" class="tab-pane">
													<?php echo $this->renderPartial("_duoxuanti",array('sur'=>$sur));?>
												</div>
                                                 
												<div id="tiankong" class="tab-pane">
													<?php echo $this->renderPartial("_tiankongti",array('sur'=>$sur));?>
												</div>
												
											</div>
										</div>
								
								
<script type="text/javascript">
	  $(document).ready(function(){
		  i = 2;
		  j = 2;
	     $('[question-add]').click(function(){
				var id = $(this).attr('question-add'); 
				if(id == 'danxuan'){
					i++;
					var t  = '<div class="space-4"></div><div class="form-group"><label class="col-sm-3 control-label no-padding-right" for="form-field-6">选项'+'<sapn>'+i+'</span>'+'：</label><div class="col-sm-4"><input name="d['+i+']" type="text" class="form-control validate[required]" placeholder="选项名称" title="" ></div></div>';
					$("[question-add-id = "+id+"]").before(t);
			    }else if(id == 'duoxuan'){
					
				    j++;
					var t  = '<div class="space-4"></div><div class="form-group"><label class="col-sm-3 control-label no-padding-right" for="form-field-6">选项'+'<sapn>'+j+'</span>'+'：</label><div class="col-sm-4"><input name="d['+j+']" type="text" class="form-control validate[required]" placeholder="选项名称" title="" ></div></div>';
					$("[question-add-id = "+id+"]").before(t);

				}
			});
			
         //begin the validate
		  $(".form-horizontal").validationEngine("attach",{ 
				promptPosition:"inline", 
				scroll:true,
				validateNonVisibleFields:false,
		  }); 			
 
     });
</script>